#include <cstdint>
#include <verilated.h>
#include <verilated_vcd_c.h>
#include "Top.h"
#include "types.h"

struct Package {
    UInt quotient;
    UInt remainder;
};

class Divider {
private:
    Top* top;
#ifdef CONFIG_VTRACE
    VerilatedVcdC* tfp;
#endif
    VerilatedContext* ctx;
public:
    Divider();
    ~Divider();
    void step();
    void single_cycle();
    void reset();
    std::pair<Package, Package> UU(UInt x, UInt y);
    std::pair<Package, Package> US(UInt x, SInt y);
    std::pair<Package, Package> SU(SInt x, UInt y);
    std::pair<Package, Package> SS(SInt x, SInt y);
};